<?=plugin\laoha\app\common\Template::header($title??'老蟹CMS')?>
<?=plugin\laoha\app\common\Template::nav('default',$active??'/')?>
<div class="container py-3 pb-0">
    <?=plugin\laoha\app\common\Template::bread($bread??'')?>
</div>
<div class="container">
    <div class="row">
        <div class="col-lg-8 mb-4">


            <div class="card shadow-sm mb-3 py-2 rounded-0">
                <?php foreach($data['items'] as $item){ ?>
                <div class="card-body">
                    <h5 class="card-title text-truncate">
                        <a class="link-underline-light" href="/app/laoha/post/detail?id=<?=$item['id']?>">
                            <?=$item['title']?>
                        </a>
                    </h5>
                    <?=$item['content']?> ...
                </div>
                <?php } 
                if(empty($data['items'])){
                    echo '<div class="card-body">暂无数据</div>';
                }
                ?>
            </div>
            <?=plugin\laoha\app\common\Template::page($data)?>
        </div>
        <div class="col-lg-4 mb-4">
            <div class="card shadow-sm mb-4 p-3 rounded-0">
                <div class="fw-bolder fs-5">文章搜索</div>
                <?=plugin\laoha\app\common\Template::search()?>
            </div>
            <div class="card shadow-sm mb-4 p-3 rounded-0">
                <div class="fw-bolder fs-5 mb-3">
                    分类选择
                </div>
                <?=plugin\laoha\app\common\Template::cate('post')?>
            </div>
        </div>
    </div>
</div>
<?=plugin\laoha\app\common\Template::footer()?>